package com.example.mongodb.mongodb;

import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * @author : zhayh
 * @Date : 2021-5-16 20:51
 * @Description:
 */

public interface RestaurantDocRepository extends MongoRepository<RestaurantDoc, ObjectId> {
    // 根据id查找文档对象
    RestaurantDoc findByDataId(Long objectId);
    // 根据keywords查找文档对象
    Page<RestaurantDoc> findByKeywords(String keyword, Pageable pageable);

}
